using Godot;
using System;
using System.Threading.Tasks;

public partial class PlayerAnimaVfx : AnimatedSprite2D
{
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
		this.Visible = false;
	}

	public void OnJump(Vector2 position)
	{
		this.Visible = true;		
        this.GlobalPosition = position;
		this.Animation = "jump";
        this.Play();		
	}

	public void OnLand(Vector2 position)
	{
		this.Visible = true;
		this.GlobalPosition = position;
		this.Animation="land";
		this.Play();
	}

	public void OnExit()
	{		
		this.Visible = false;
		this.Stop();
	}
}
